//
//  CHProgressSheet.m
//  Chocolat
//
//  Created by Pieter Omvlee on 9/22/08.
//  Copyright 2008 BohemainCoding. All rights reserved.
//

#import "CHProgressSheet.h"


@implementation CHProgressSheet

- (void)awakeFromNib
{
  [textField setStringValue:object];
  [progress startAnimation:self];
}

- (void)setProgressMaximum:(int)max
{
  [progress setIndeterminate:NO];
  [progress setMaxValue:max];
  [progress setDoubleValue:0];
  [progress setUsesThreadedAnimation:YES];
  
  [[self window] display];
}

- (void)incrementProgress
{
  [progress incrementBy:1];
  
  [[self window] display];
}

- (BOOL)isMaximum
{
  return [progress doubleValue] >= [progress maxValue];
}

@end
